package com.csy.basethread;

import com.csy.util.ILogFactory;
import org.junit.Test;

class ThreadDemo02 implements Runnable, ILogFactory {
    public void run() {
        for (int i = 0; i < 10; i++) {
            log.info("子线程i:{}", i);
        }
    }
}

public class Test002 implements ILogFactory {
    @Test
    public void main() {
        log.info("主线程开始。。。。。。");
        ThreadDemo02 threadDemo02 = new ThreadDemo02();
        Thread thread1 = new Thread(threadDemo02);
        thread1.start();
        for (int i = 0; i < 10; i++) {
            log.info("主线程i:{}", i);
        }
        log.info("主线程结束。。。。。。");
    }
}
